package com.tymoshenko.seabattle.client.view;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.IsWidget;
import com.tymoshenko.seabattle.shared.model.domain.Player;
import com.tymoshenko.seabattle.shared.model.domain.Point;

/**
 * @author Yakiv Tymoshenko
 * @since 29.01.13
 */
public interface DashboardView extends IsWidget {

    public void processShot(ClickEvent clickEvent);

    public void repaintTable(FlexTable table);

    public FlexTable getOwnBoard();

    public FlexTable getOpponentBoard();

    public void setNewGamePresenter(NewGamePresenter presenter);

    public ShipPlacementPresenter getShipPlacementPresenter();

    public void setShipPlacementPresenter(ShipPlacementPresenter presenter);

    public ShootingPresenter getShootingPresenter();

    public void setShootingPresenter(ShootingPresenter presenter);

    public interface NewGamePresenter {
        public void startNewGame();
    }

    public interface ShipPlacementPresenter {
        public void placeShips();
    }

    public interface ShootingPresenter {
        public void shoot(Point target, Player opponent);
    }
}
